#! /usr/bin/python

'''
Main function for the program. This is the main entry point. Due to the way that
it is loaded the uncrobotics shoudl be fully loaded at this poitn so there is no
need to import it again.
'''
def main():
	# Kill all humans
	print "Kill all humans"

if __name__ == "__main__":
	try:
		import uncrobotics
	except:
		print "It isn't fair to try and run the program without the uncrobotics module in the python path. Quitting"
		exit()

	import sys
	try:
		if sys.argv[1] == 'test':
			import test
			print """
----------------------------------------------------------------------
Running all tests
----------------------------------------------------------------------"""
			test.main()
			exit() #Quit after running tests

	except IndexError, e:
		# This means that we didn't pass any arguments into main.py, run normaly
		main()

	except Exception, e: # Don't leave it blank because it will catch SystemExit's
		print e.__class__
		print "Something very bad has happened. Please download the code again"
		exit()


